using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Zosnn.Models.Mapping
{
    public class Order_InfoMap : EntityTypeConfiguration<Order_Info>
    {
        public Order_InfoMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ProductName)
                .HasMaxLength(200);

            this.Property(t => t.SmallPic)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("Order_Info");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.ProductID).HasColumnName("ProductID");
            this.Property(t => t.OrderID).HasColumnName("OrderID");
            this.Property(t => t.Count).HasColumnName("Count");
            this.Property(t => t.ProductName).HasColumnName("ProductName");
            this.Property(t => t.SmallPic).HasColumnName("SmallPic");
        }
    }
}
